<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>web worder</title>
</head>
<body>
  <div>
    web worker
  </div>
  <script>
    let worker = new Worker('./worker.js')
    worker.postMessage('我是主线程 这是发送的数据')
    worker.onmessage = function(data) {
      console.log('this is main process access data ==',data.data)
    }
  </script>
</body>
</html>